package com.hgy.service.impl;

import com.hgy.dao.CarDao;
import com.hgy.entity.Car;
import com.hgy.service.CarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author : ang
 * @Program: carSystem
 * @Title : CarServiceImpl
 * @Date : 2020-08-27 19:34
 **/
@Service
public class CarServiceImpl implements CarService {

    @Autowired
    private CarDao carDao;

    @Override
    public List<Car> findByPrice(Integer cid) {
        List<Car> list = carDao.findByPrice(cid);
        return list;
    }

    @Override
    public List<Car> findByNumber(Integer cid) {
        List<Car> list = carDao.findByNumber(cid);
        return list;
    }

    @Override
    public Car findById(Integer id) {
        Car car = carDao.findById(id);
        return car;
    }
}
